import React from 'react';
import ReactDOM from 'react-dom';
import {BrowserRouter, Route} from 'react-router-dom';

import {AsyncComponent} from '../components/AsyncComponent';

const Index = AsyncComponent(() => import('../views/Index'));
const Home = AsyncComponent(() => import('../views/Home'));

ReactDOM.render(
	<BrowserRouter>
		<div>
			<Route path="/index" component={Index}/>
			<Route path="/home" component={Home}/>
		</div>
	</BrowserRouter>, document.getElementById('root')
);
